public class Main {
    public static void main(String[] args) {
        StringBuilder str1 = new StringBuilder("hello");
        System.out.println(str1.capacity());//容量是21

        str1.ensureCapacity(128);
        System.out.println(str1.capacity());//修改之后的容量是128
    }
}
